 #include <iostream>
 using namespace std;
 class Data{
	public:
		int a,b,c;
		Data():a(0),b(0),c(0){}
		void print() const{
			cout << a << "," << b << "," << c << endl;
		}
 };
 
 int main(){
	Data d, *dp = &d;
	dp->print();
	int Data::*pmInt = &Data::a;
	dp->*pmInt = 47;
	dp->print();
	pmInt = &Data::b;
	d.*pmInt = 48;
	pmInt = &Data::c;
	dp->*pmInt = 49;
	dp->print();
	return 0;
 }
 